package com.qidi.eureka.enreka;

import com.qidi.hello.HelloService;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableEurekaServer
@EnableHystrix
@EnableCircuitBreaker
@EnableHystrixDashboard
@EnableAdminServer
@RestController
public class EnrekaApplication {

	public static void main(String[] args) {
		SpringApplication.run(EnrekaApplication.class, args);
	}

	@Autowired
	private HelloService exampleService;

	@GetMapping("/input")
	public String input(String word){
		return exampleService.wrap(word);
	}



}
